/*
 * Copyright (c) 2023 Huawei Technologies Co., Ltd.
 * openUBMC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *         http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#ifndef _I_MOCK_CHIP_H_
#define _I_MOCK_CHIP_H_

#include <chip/interface/i_chip.h>
#include <mc/engine.h>

namespace mock_chip {

class Interface_Chip_mock : public mc::engine::interface<Interface_Chip_mock> {
public:
    MC_INTERFACE("bmc.dev.Chip.Mock")
    Interface_Chip_mock()  = default;
    ~Interface_Chip_mock() = default;

    std::vector<uint8_t> BlockIORead(const uint32_t& offset, const uint32_t& length);
    void                 BlockIOWrite(const uint32_t& offset, const std::vector<uint8_t>& buffer);
    std::vector<uint8_t> WriteRead(const std::vector<uint8_t>& data, const uint32_t& length);
    std::vector<uint8_t> BlockIOWriteRead(const std::vector<uint8_t>& indata,
                                          const uint32_t&             read_length);
    std::vector<uint8_t> BlockIOComboWriteRead(const uint32_t&             write_offset,
                                               const std::vector<uint8_t>& write_buffer,
                                               const uint32_t&             read_offset,
                                               const uint32_t&             read_length);
};

} // namespace mock_chip

#endif // _I_MOCK_CHIP_H_